#ifndef INTERFACE_H
#define INTERFACE_H

#include <gtk/gtk.h>
#include <glade/glade.h>

#define SUCCESS 1
#define FAILURE 0

#define LOCAL_IMAGE_LIST        0X03
#define SERVER_SECRET_DATA_TREE 0x04
#define LOCAL_SECRET_DATA_TREE  0X05
#define ACTIVITY_MODE 0

// 隐私数据文件路径，缓冲区长度
#define MAXPATH 128
#define SD_PATH "/home/xiaoyi/tmp/ACM/"

// 提示对话框封装函数
gint showDialog(GtkWindow *parent,
                GtkDialogFlags flags,
	            GtkMessageType type,
                GtkButtonsType buttons,
                const gchar *message_format,
                ...);

gint call(GladeXML **window, gint argc, gchar **argv, gchar *str, gint treeType);

// 本地虚拟就镜像树的列
enum
{
  IMAGE_NAME = 0,
  DOWNLOAD_TIME,
  LAST_LOGIN_TIME,
  NUM_IMAGE_COLS
};

// 隐私数据树的列
enum
{
  ICON_NAME = 0,
  FILE_NAME,
  NUM_FILE_COLS
};


typedef struct st_progress
{
    gdouble step;
    GtkProgressBar *pb;

} PROGRESSBAR;

gboolean flag ;
PROGRESSBAR Pb;


// 设置树的列，行属性，显示树函数
gint addListColum(GtkTreeView * treeview, char* title, char * type, int index);
gint addListRow(GtkWidget * treeview, void **ListStore, guint Type);
gint treeView(GladeXML *Window, gchar *TreeView, guint Type);


gint progress_timeout(gpointer data);

int getfile(char *dir , GtkTreeStore *treestore, GtkTreeIter iter);

#endif
